import type { PlusColumn } from "plus-pro-components";

const tableColumns: TableColumnList = [
  {
    label: "权限名",
    prop: "name"
  },
  {
    label: "权限标识",
    prop: "code"
  },
  {
    label: "权限类型",
    prop: "type",
    slot: "type"
  },
  {
    label: "描述",
    prop: "description"
  },
  {
    label: "鉴权状态",
    prop: "status",
    slot: "status"
  },
  {
    label: "操作",
    prop: "operation",
    slot: "operation",
    fixed: "right",
    width: 200
  }
];

const fromColumns: PlusColumn[] = [
  {
    label: "权限名称",
    prop: "name",
    valueType: "copy"
  },
  {
    label: "权限编码",
    prop: "code",
    valueType: "copy"
  },
  {
    label: "权限类型",
    prop: "type",
    valueType: "select",
    options: [
      { label: "目录", value: 1 },
      { label: "权限", value: 2 }
    ]
  },
  {
    label: "描述",
    prop: "description",
    valueType: "input"
  },
  {
    label: "鉴权状态",
    prop: "status",
    valueType: "select",
    options: [
      { label: "启用", value: 1 },
      { label: "禁用", value: 0 }
    ]
  }
];

export { fromColumns, tableColumns };
